home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CUCD / Programming / AMOSList / AMOSLIST / text0091.txt < prev    next >
Encoding:
Text File  |  1998-04-01  |  784 b   |  27 lines

  1. >> Ok how will do to make amos to understand that i want to threat this
  2. >> as a number instead of an ascii value?
  3. >Isnt this ASC ? or is this some other language thats bouncing round
  4. >my head!
  5.  
  6. >a=asc("5") sets a to 5 ????
  7.  
  8. This is AMOS but does the opposite of what you are thinking.
  9. It would set 'a' to the ASCII value of the string "5".
  10.  
  11. What you want to use is VAL I think (although I have forgotten what you were 
  12. originally trying to do now!).
  13.  
  14. But, remembering bits, you were PEEKing a value from memory and trying to do 
  15. some maths on the result...
  16.  
  17. so a bit of your code is a=PEEK(start(16)) which returns the ASCII value of 
  18. "5", you need to convert the ASCII value to a string using CHR$, then 
  19. convert the string into a numeric...
  20.  
  21. a=(VAL(CHR$(PEEK(Start(16)))
  22.  
  23.  
  24. Wayne.
  25.  
  26.  
  27.